<div class="portlet" ng-show="!empGrid.editFlag">
	<div class="portlet-actions">
		<button class="btn blue btn-sm" ng-click="empGrid.add()"><i class="fa fa-plus"></i> 新增</button>
	</div>
	<div class="col-md-3">
		<div class="portlet-body">
			<div ed-dept-tree ed-click="selectDept" style="height:450px; overflow:auto;"></div>
		</div>
	</div>
	<div class="col-md-9">
		<form class="portlet-search-body" name="queryForm">
			<input type="text" class="form-control search-item" ng-model="codeOrName" placeholder="员工编码或姓名">

			<button class="btn btn-sm query" ng-click="empGrid.query();"><i class="fa fa-search"></i> 查询</button>
			<button class="btn btn-sm reset" ng-click="empGrid.reset();"><i class="fa fa-eraser"></i> 重置</button>
		</form>
		<div class="portlet-body">
			<table ed-grid="empGrid" class="table table-striped table-bordered table-advance table-hover"
				   data-options="url: 'employee/query.do', model: 'employee', modelText: '员工', queryForm: 'queryForm', modal: 'modal'">
				<thead>
				<tr>
					<th data-options="field: 'empCode'">员工编号</th>
					<th data-options="field: 'empName'">员工姓名</th>
					<th data-options="field: 'gender | code : gender'">性别</th>
					<th data-options="field: 'telephone'">手机号码</th>
					<th data-options="field: 'posId | code : pos' ">岗位</th>
					<th data-options="field: '_edit'">操作</th>
				</tr>
				</thead>
			</table>
		</div>
	</div>
</div>

<div class="portlet" ed-modal-domain="modal">
	<form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
		<div class="form-body">
			<div class="form-group">
				<label class="col-md-3 control-label">员工编号</label>

				<div class="col-md-4">
					<input type="text" class="form-control" name="empCode" ng-model="employee.empCode" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-3 control-label">员工姓名</label>

				<div class="col-md-4">
					<input type="text" class="form-control" name="empName" ng-model="employee.empName"
						   required ed-validate="name" ng-maxlength="10">
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-3 control-label">性别</label>

				<div class="col-md-4">
					<select class="form-control" name="gender" ng-model="employee.gender"
							ng-options="opt.value as opt.name for opt in options.gender" required></select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-3 control-label">手机号码</label>

				<div class="col-md-4">
					<input type="text" class="form-control" ng-model="employee.telephone">
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-3 control-label">所属部门</label>

				<div class="col-md-4">
					<div ed-combotree name="deptId" ng-model="employee.deptId" ed-data="depts"
						 data-options="idField: 'deptId', textField: 'deptName', parentIdField: 'parentDeptId'" required></div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-3 control-label">岗位</label>

				<div class="col-md-4">
					<select class="form-control" name="posId" ng-model="employee.posId"
							ng-options="opt.value as opt.name for opt in options.pos" required></select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-3 control-label">员工描述</label>

				<div class="col-md-4">
					<textarea class="form-control" rows="3" ng-model="employee.remark"></textarea>
				</div>
			</div>
		</div>
		<div class="form-actions col-md-offset-2">
			<button type="button" class="btn blue" w5c-form-submit="empGrid.save()">
				<i class="fa fa-save"></i> 保存
			</button>
			<button type="button" class="btn default" ng-click="empGrid.cancel();">
				<i class="fa fa-times"></i> 取消
			</button>
		</div>
	</form>
</div>